/* HandsontableModal.css */
.handsontable-modal-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.page-header {
  text-align: center;
  color: white;
  margin-bottom: 30px;
  padding: 40px 20px;
}

.page-header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  font-weight: 600;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.action-section {
  margin-bottom: 30px;
}

.action-card {
  text-align: center;
  padding: 20px;
}

.action-icon {
  font-size: 3rem;
  color: #1890ff;
  margin-bottom: 15px;
}

.action-content h3 {
  color: #1890ff;
  margin-bottom: 10px;
}

.action-content p {
  color: #666;
  margin-bottom: 15px;
}

.stats-card {
  padding: 20px;
  text-align: center;
}

.stats-card .ant-statistic {
  margin-bottom: 15px;
}

.stats-card .ant-statistic-title {
  color: #666;
  font-size: 14px;
}

.stats-card .ant-statistic-content {
  color: #1890ff;
  font-size: 1.8rem;
}

/* 弹窗样式 */
.handsontable-modal .ant-modal-content {
  border-radius: 12px;
  overflow: hidden;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 600;
}

.unsaved-changes {
  color: #ff4d4f;
  font-size: 0.9rem;
  font-weight: normal;
}

.modal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-card,
.table-card,
.instructions-card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.switch-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-label {
  color: #666;
  font-size: 14px;
}

/* 操作栏 */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}

.change-indicator {
  color: #52c41a;
  font-size: 14px;
  font-weight: 500;
}

.change-indicator:before {
  content: "●";
  margin-right: 6px;
}

.action-bar .change-indicator:contains('未保存') {
  color: #ff4d4f;
}

/* 表格容器 */
.table-container {
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
}

.custom-hot-table {
  font-size: 14px;
}

/* 使用说明 */
.instructions-card .ant-card-head {
  background: #f8f9fa;
  border-bottom: 1px solid #e8e8e8;
}

.instruction-item {
  padding: 8px 0;
}

.instruction-item strong {
  color: #1890ff;
  display: block;
  margin-bottom: 4px;
}

.instruction-item p {
  color: #666;
  margin: 0;
  font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .handsontable-modal-page {
    padding: 10px;
  }
  
  .page-header {
    padding: 20px 10px;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
  
  .action-bar {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .action-bar .ant-space {
    justify-content: center;
  }
  
  .handsontable-modal .ant-modal {
    width: 95% !important;
    max-width: none;
  }
}

/* Handsontable 自定义样式 */
:root {
  --hot-selection-color: #1890ff;
  --hot-header-background: #1890ff;
}

.handsontable thead th {
  background-color: var(--hot-header-background) !important;
  color: white !important;
  font-weight: 600;
}

.handsontable .htContextMenu table.htCore {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 加载状态 */
.ant-btn-loading {
  opacity: 0.7;
}

/* 禁用状态 */
.ant-btn[disabled] {
  background-color: #f5f5f5;
  border-color: #d9d9d9;
  color: rgba(0, 0, 0, 0.25);
}